home *** CD-ROM | disk | FTP | other *** search
- unit Unit1;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls,
- MinMax;
-
- type
- TForm1 = class(TForm)
- Label1: TLabel;
- MinMax1: TMinMax;
- Label2: TLabel;
- CheckBox1: TCheckBox;
- procedure FormCreate(Sender: TObject);
- procedure CheckBox1Click(Sender: TObject);
- private
- { DΘclarations privΘes }
- public
- { DΘclarations publiques }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm1.FormCreate(Sender: TObject);
- var
- Tmp: String;
- begin
- FmtStr(Tmp, 'Min : (%d, %d)',
- [MinMax1.MinTrackSize.X, MinMax1.MinTrackSize.Y]);
- Label1.Caption := Tmp;
- FmtStr(Tmp, 'Max : (%d, %d)',
- [MinMax1.MaxTrackSize.X, MinMax1.MaxTrackSize.Y]);
- Label2.Caption := Tmp;
- end;
-
- procedure TForm1.CheckBox1Click(Sender: TObject);
- begin
- if CheckBox1.Checked then
- MinMax1.Options := MinMax1.Options + [opAllowResize]
- else
- MinMax1.Options := MinMax1.Options - [opAllowResize];
- end;
-
- end.
-